#include "Point.h"
#include <fstream>

//METHODS

//constructor
Point::Point(double x, double y)
{
	m_x = x;
	m_y = y;
}

void Point::GetAll(double& x, double& y) const
{
	x = m_x;
	y = m_y;
}

void Point::Set_All(const double x,const double y)
{
	m_x = x;
	m_y = y;
}

bool Point::operator==(const Point& other) const
{
	if (m_x == other.m_x && m_y == other.m_y)
	{
		return true;
	}
	return false;
}


std::ostream& operator<<(std::ostream& os, const Point& point)
{
	os << " x= " << point.m_x << " y= " << point.m_y;
	return os;
}

Point& operator>>(std::ifstream& is, Point& point)
{
	char  buff[20];
	is>> buff >> point.m_x;
	is >> buff >> point.m_y;
	
	return point;
}